package com.xiaren.udp;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class ClientSocket {
	public static void main(String[] args) throws IOException {

		int port = 8585;
		String ipAddress = "192.168.1.10";
		DatagramSocket clientSocket = new DatagramSocket();
		byte[] buf = {23,2,2,12,1,34,5,86,23,24,2,42,-1,7,52,6,3,6,4,3,33};
		InetAddress address = InetAddress.getByName(ipAddress);
		
		DatagramPacket inPacket = new DatagramPacket(buf, buf.length,address,port);
		
		clientSocket.send(inPacket);
//		clientSocket.receive(p)
		
		
//		clientSocket.close();


	}
}
